package Euler6;

public class SumSquare {
	public static void main(String[] args) {
		long sumSquare = 0, squareSum = 0, diff = 0;
		long max = 100;
		
		//Sum of the squares.
		for(int i = 1; i <= max; i++)
		{
			sumSquare += (long) Math.pow(i, 2);
		}
		
		System.out.println(sumSquare);
		
		//Square of the sum.
		for(int i = 1; i <= max; i++)
		{
			squareSum += i;
		}
		squareSum = (long) Math.pow(squareSum, 2);
		
		System.out.println(squareSum);
		
		diff = squareSum - sumSquare;
		
		System.out.println(diff);
		
	}
}
